import axiosRequest from '@/utils/request';

//文化科普列表
export function getCultPopList(cityCode) {
    return axiosRequest({
        url: `/cult-pop/list?cityCode=${cityCode}`,
        method: 'GET',
    });
}

// 文化科普详情页
export function getCultPopDetail(id) {
    return axiosRequest({
        url: `/cult-pop/articles/detail?id=${id}`,
        method: 'GET',
    });
}

// 图片上传
export function uploadArticlePicture(data) {
    return axiosRequest({
        url: '/mana/articles/upload',
        method: 'POST',
        data: data,
    });
}

export function deleteArticlePicture(data) {
    return axiosRequest({
        url: '/mana/articles/upload/delete',
        method: 'DELETE',
        data: data,
    });
}

export function publishArticle(data) {
    return axiosRequest({
        url: '/mana/articles/publish',
        method: 'POST',
        data: data,
    });
}
